using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Outpatient.Doman.Hospitalization
{
    /// <summary>
    /// 病房表
    /// </summary>
    [Table("Room")]
    public class Room
    {
        /// <summary>
        /// 病房唯一标识,主键,自增
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int RoomId { get; set; }

        /// <summary>
        /// 病房编号,如301、302(支持前缀+数字)
        /// </summary>
        [Required]
        [StringLength(20)]
        public string RoomNumber { get; set; } = string.Empty;

        /// <summary>
        /// 所在楼层,如3、4
        /// </summary>
        public int Floor { get; set; }

        /// <summary>
        /// 关联科室表的外键
        /// </summary>
        public int DepartmentId { get; set; }

        /// <summary>
        /// 病房类型ID，关联病房类型表
        /// </summary>
        public int RoomTypeId { get; set; }

        /// <summary>
        /// 该病房可容纳的病床总数
        /// </summary>
        public int Number_beds { get; set; }

        /// <summary>
        /// 每日住院费用(单位:元)
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal Price { get; set; }

        /// <summary>
        /// 记录创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; } = DateTime.Now;

        /// <summary>
        /// 逻辑删除、默认0未删除 1已删除
        /// </summary>
        public bool IsDelete { get; set; } = false;
    }
} 